/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package packageModel;

import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.HashMap;

/**
 *
 * @author laurent
 */
public class ProductsLine implements Serializable
{
    private Product product;
    private String priceTot;
    private String priceUnit;
    private int nbProducts;
    
    public ProductsLine(Product product, int nbProducts)
    {
        this.product = product;
        this.nbProducts = nbProducts;
    }
    
    public Product getProduct() { return this.product; }
    public int getNbProducts() { return this.nbProducts; }
    public String getPriceTot() { return this.priceTot; }
    public String getPriceUnit() { return this.priceUnit; }
    
    public void setNbProducts(int nbProducts) { this.nbProducts = nbProducts; }
    
    public void setPriceTot(double priceTot) 
    { 
        DecimalFormat formatPriceTot = new DecimalFormat("#####.00");
        this.priceTot = formatPriceTot.format(priceTot); 
    }
    
    public void setPriceUnit(double priceUnit) 
    { 
        DecimalFormat formatPriceUnit = new DecimalFormat("#####.00");
        this.priceUnit = formatPriceUnit.format(priceUnit); 
    }
}
